﻿<link href="/Content/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/Content/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<script src="/Content/js/plugins/iCheck/icheck.min.js"></script>
<script src="/Content/js/plugins/sweetalert/sweetalert.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script src="/Content/layer/layer.js"></script>
<script language="JavaScript" type="text/javascript" src="/Content/My97DatePicker/WdatePicker.js"></script>
<style>
.app{
	width:750px;
	height:400px;
	background-image: url('/Content/images/bg.png');
	background-size:100% 100%;-moz-background-size:100% 100%;}  
}

</style>

<div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
					通知记录
							
                    </div>
									 <div class="ibox-content">
		<form action="/index.php/Home/Index/tongzhiloglist" method="get" >
			开始时间
      ：<input type="text"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd 00:00'})" class="Wdate" value="{$stime}"  name="stime" style="width:150px;"  />
	  结束时间
      ：<input type="text"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd 23:59'})" class="Wdate" value="{$etime}"  name="etime" style="width:150px;"  />
	  
        <input type="submit" value=" 查 询 " id="search" />
		
    
	  <input type="hidden"  name="typeid" value="{$typeid}" />
	</form>
    </div>
					<div class="ibox-content">
					
					 <table class="table table-striped">
                            <thead>
					
                            <tr>
						
							   <th>类型</th>
							       <th>发送人</th>
							    <th>发送内容</th>
							   <th>时间</th>
							    <th>分组</th>
								
							<if condition="$typeid == 2 ">
							 <th>频道</th>
							<else /> 
						</if>
													
								
								
                            </tr>
                            </thead>
                            <tbody>
						<volist name="alist" id="vo">
							<tr>
					
					 <td>{$vo['type']}</td>	  
					 <td>{$vo['username']}</td>	  
					<td>{$vo['content']}</td>
				<td>{$vo['createtime']|date='Y-m-d H:i:s',###}</td>	  
						<td>{$vo['zuname']}</td>
						<if condition="$typeid == 2 ">
								<td>{$vo['tvname']}</td>	  
							<else /> 
						</if>						
			
						</tr>						
				    </volist>
					<tr>
						<td colspan="9">
						<div class="pagelist">{$page}</div>
						</td>
					</tr>
                            </tbody>
                        </table>
						 </div>
                </div>
            </div>
<script>
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
			
			$("#delete").click(function(){
				 var i=0;
				 var ids="";
				 $('.i-checks').each(function(){
				 var check = this;
					
					 if(check.checked){
					   i=i+1;
					   ids=ids+$(this).val()+",";    
					 }
					
				 });
				
				 if(i==0){
						  swal({
								title: "请选择",
								text: ""
							});

				 }else{
					 swal({
						title: "确定要删除吗?",
						text: "",
						type: "warning",
						showCancelButton: true,
						confirmButtonColor: "#DD6B55",
						confirmButtonText: "是",
						closeOnConfirm: false
					}, function () {
						ids=ids.substring(0,ids.length-1);
						$.post("/index.php/Home/Index/dellog",{"ids": ids},function(data){
							if(data=="0"){
								swal("Deleted!", "已删除", "success");
								window.location.reload();//刷新当前页面.
							}else{
								swal("Deleted!", "系统异常", "success");
							}
						});
						
					});

				 
				 }
			});
			
			

        });
		
		 
    </script>
